﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Castle.MicroKernel.Registration;
using Castle.Windsor;
using Mammoth.Entities;
using Mammoth.Repositories;
using Mammoth.Services;

namespace Mammoth.Factories
{
    public class ExpensiveServiceInstaller : IWindsorInstaller
    {
        public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store)
        {
            container.Register(Component.For<IDataSessionFactory>()
               .ImplementedBy<DataSessionFactory>());
            container.Register(Component.For<IGTalkService>()
                .ImplementedBy<GTalkService>());
            container.Register(Component.For(typeof(IRepository<>))
                .ImplementedBy(typeof(Repository<>))
                .LifeStyle.Transient);
        }
    }
}
